﻿using Quartz;
using Quartz.Spi;
using System;
using System.Collections.Generic;
using System.Text;
using DotNetExtensions.Core.Autofac;
namespace DotNetExtensions.Core.Quartz
{
    public class ResolverJobFactory : IJobFactory
    {
        public IJob NewJob(TriggerFiredBundle bundle, IScheduler scheduler)
        {
            Type type = bundle.JobDetail.JobType;
            return RegistTypeResolver.ResolveNamed<IJob>(type.FullName);
        }

        public void ReturnJob(IJob job)
        {
            throw new NotImplementedException();
        }
    }
}
